	<?php 
		$ci= &get_instance();
		$tournament_id = intval($_POST['tournament_id']);
		$listCategory = $ci->category_manual_tournament_entity->getListCategoriesByStatus($tournament_id, 'cancelled');
		$eventCategoryStatus = eventCategoryStatusDataConfig();
		$typeArray = getManualCategoryConfig();
		$betStatus = array('yes' => 'Open' , 'no' => 'Hide');
	
	?>
	
	<div class="clrboth"></div>
	<div class="grid10" style="width:800px;">
		<input type="button" value="Add Category" onclick="add_category_manual(<?php echo $tournament_id;?>);" />
		&nbsp;&nbsp;&nbsp;
		<a href="javascript:void(0);" onclick="view_manual_event(<?php echo $tournament_id;?>);">Live/UpComing Categories</a>
		&nbsp;&nbsp;
		<a href="javascript:void(0);" onclick="view_manual_event_closed(<?php echo $tournament_id;?>);">Closed Categories</a>
		&nbsp;&nbsp;
		<a href="javascript:void(0);" onclick="view_manual_event_cancelled(<?php echo $tournament_id;?>);">Cancelled Categories</a>
	</div>
	<br/><br/>
	<div class="clrboth"></div>
<table>
<thead>
	<th><div class="grid3"><span class="bold" style="font-weight:bold;">Category</span></div></th>
	<th><div class="grid1"><span class="bold" style="font-weight:bold;">Type</span></div></th>
	<th><div class="grid1"><span class="bold" style="font-weight:bold;">Odds</span></div></th>
	<th><div class="grid1"><span class="bold" style="font-weight:bold;">Status</span></div></th>
	<th><div class="grid2"><span class="bold" style="font-weight:bold;">Who bet/ Result</span></div></th>

</thead>	
<tbody>
	<div class="clrboth"></div>
	<?php foreach($listCategory as $item):?>
		<?php $CAT = $ci->category_manual_tournament_entity->init('id', $item->id);?>
		<tr>
			<td><?php echo $CAT->getCategoryName();?></td>
			<td><?php echo $typeArray[$CAT->getType()];?></td>
			<td><?php echo $CAT->getOdds();?></td>
			
			<td><?php echo $eventCategoryStatus[$CAT->getStatus()];?></td>
			<td>
				<a href="javascript:void(0);" onclick="open_window_manual_event(<?php echo $CAT->getId();?>)">
					View
				</a>
			</td>
			
		</tr>
	<?php endforeach;?>
</tbody>
</table>	

